package com.my.library.controller;

import javax.servlet.http.HttpSession;

import org.springframework.web.bind.annotation.RequestMapping;

public class AbstractController {

	@RequestMapping("/")
	public String index(HttpSession session) {
		RequestMapping rm = this.getClass().getAnnotation(RequestMapping.class);
		session.setAttribute("middleUrl", rm.value());
		return "index";
	}
	
	@RequestMapping("/addIndex")
	public String addIndex(HttpSession session) {
		RequestMapping rm = this.getClass().getAnnotation(RequestMapping.class);
		session.setAttribute("middleUrl", rm.value());
		return "add";
	}

}
